<template>
    <span>登陆中...</span>
</template>

<script lang="ts" setup>
import { loginauthApi } from '@/api/Login';
import { useAuthStore } from '@/store';
import { useRoute, useRouter } from "vue-router"
    const auth = useAuthStore()

    const router = useRouter()

    loginauthApi().then(r => {
        if(r.success) {
            auth.handleLogin(r.data)
            router.replace('/')
        }
    })
</script>